﻿@model GameSchoolApplication.Models.ChangePasswordModel

@{
    ViewBag.Title = "Breyta lykilorði";
   /* if (User.IsInRole("Student"))
    {
        Layout = "~/Views/Shared/_StudentLayout.cshtml";
    }
    if(User.IsInRole("Teacher"))
    {
        Layout = "~/Views/Shared/_TeacherLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_AdministratorLayout.cshtml";*/
}
<section id="SingleMainContent">
<h2>Breyta lykilorði</h2>
<p>
    
</p>
<p>
    Nýtt lykilorð þarf að vera að lágmarki @Membership.MinRequiredPasswordLength tákn að lengd.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Breyting á lykilorði tókst ekki. Vinsamlegast prófaðu aftur.")
    <div>
        <fieldset>
            <legend></legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <p>
                <input type="submit" value="Breyta lykilorði" />
            </p>
        </fieldset>
    </div>
}
</section>